/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;


import dominio.Matricula;
import java.util.Set;

/**
 *
 * @author jair
 */
public class MatriculaDAO extends GenericDAO {

     public int inserirMatricula(Matricula matricula){
        salvar(matricula);
        return matricula.getId();
    }
    
    public void apagarMatricula(Matricula matricula){
        remover(matricula);
    }
    
    public void atualizarMatricula(Matricula matricula){
        atualizar(matricula);
    }
    
    public Set<Matricula> getMatriculas(){
        return getLista(Matricula.class,"select m from Matricula m");
    }

}
